import java.util.ArrayList;
import java.util.List;

public class Instructor {

    private String name;
    private Department department;
    private List<Subject> subjects;

    public Instructor(String name, Department department) {
        this.name = name;
        this.department = department;
        this.subjects = new ArrayList<>();
    }

    public String getName() {
        return name;
    }

    public Department getDepartment() {
        return department;
    }

    public void addSubject(Subject subject) {
        if (subjects.size() < 3) {
            subjects.add(subject);
        }
    }

    public List<Subject> getSubjects() {
        return subjects;
    }
}
